<?php



/**
 * This class defines the structure of the 'car' table.
 *
 *
 *
 * This map class is used by Propel to do runtime db structure discovery.
 * For example, the createSelectSql() method checks the type of a given column used in an
 * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
 * (i.e. if it's a text column type).
 *
 * @package    propel.generator.ise-php.map
 */
class CarTableMap extends TableMap
{

	/**
	 * The (dot-path) name of this class
	 */
	const CLASS_NAME = 'ise-php.map.CarTableMap';

	/**
	 * Initialize the table attributes, columns and validators
	 * Relations are not initialized by this method since they are lazy loaded
	 *
	 * @return     void
	 * @throws     PropelException
	 */
	public function initialize()
	{
		// attributes
		$this->setName('car');
		$this->setPhpName('Car');
		$this->setClassname('Car');
		$this->setPackage('ise-php');
		$this->setUseIdGenerator(false);
		// columns
		$this->addPrimaryKey('PLATE', 'Plate', 'VARCHAR', true, 8, '');
		$this->addForeignKey('MODELID', 'Modelid', 'INTEGER', 'model', 'MODELID', false, 10, null);
		$this->addForeignKey('STATIONID', 'Stationid', 'INTEGER', 'station', 'STATIONID', false, 10, null);
		$this->addColumn('ADMISSION', 'Admission', 'DATE', true, null, null);
		$this->addColumn('KM', 'Km', 'INTEGER', false, 10, 1);
		// validators
	} // initialize()

	/**
	 * Build the RelationMap objects for this table relationships
	 */
	public function buildRelations()
	{
		$this->addRelation('Model', 'Model', RelationMap::MANY_TO_ONE, array('modelid' => 'modelid', ), null, null);
		$this->addRelation('Station', 'Station', RelationMap::MANY_TO_ONE, array('stationid' => 'stationid', ), null, null);
	} // buildRelations()

} // CarTableMap
